package com.neusoft.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.neusoft.po.Orders;

@Mapper
public interface OrdersMapper {

	@Select("select * from orders where deliveryManId=#{deliveryManId} order by deliveried")
	public List<Orders> listOrdersByDeliveryManId(String deliveryManId);
	
	@Select("select * from orders where deliveried=0 order by orderId")
	public List<Orders> listUndeliveryOrders();

	//update 可修改收货地址和订单支付状态，多出两个按钮
	@Update("update orders set deliveried=1,deliveryManId=#{arg1} where orderId=#{arg0}")
	public int deliveryOrder(Integer orderId, String deliveryManId);
	
	

}
